parser grammar ANTLRParser;

options {
  language = Java;
  tokenVocab = ANTLRLexer;
}

@header {
    package es.etsii.pl.P6_Flexer;
}

entrada : (regla)+ EOF;
regla: NO_TERMINAL COLON regexp SEMICOLON;

regexp: reg ( (OR)? regexp)?;
reg: parentado | CADENA | NO_TERMINAL | TERMINAL | ENDFILE;
parentado: LPARENTHESIS regexp RPARENTHESIS cierre;
cierre: (ASTERISK | PLUS | QUESTION)?;